#include<bits/stdc++.h>
#define int long long
#define ls(x) ((x)*2)
#define rs(x) ((x)*2+1)
#define Debug(...) fprintf(stderr, __VA_ARGS__)
#define For(i,a,b) for(int i=a,i##end=b;i<=i##end;i++)
#define Rof(i,a,b) for(int i=a,i##end=b;i>=i##end;i--)
#define rep(i,  b) for(int i=1,i##end=b;i<=i##end;i++)
using namespace std;
const int N=2e5+5,Mod=998244353;
//char buf[(1<<21)+5],*p1,*p2;
//#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
inline void chmx(int &x,int y){(x<y)&&(x=y);}
inline void chmn(int &x,int y){(x>y)&&(x=y);}
inline void Add(int &x,int y){(x=x+y+Mod)%=Mod;}
inline int read(){
	int f=0,x=0;
	char ch=getchar();
	while(!isdigit(ch)){f|=(ch=='-');ch=getchar();}
	while(isdigit(ch)){x=(x<<3)+(x<<1)+(ch^48);ch=getchar();}
	return f?-x:x;
}
bool SSS;
struct Matrix{
	int a[205][205],m;
}A;	
inline Matrix cheng(Matrix a,Matrix b){
		Matrix res;
		For(i,1,a.m)For(j,1,a.m) res.a[i][j]=0;
		For(k,1,a.m){
			For(i,1,a.m){
				For(j,1,a.m){
					(res.a[i][j]+=a.a[i][k]*b.a[k][j])%=Mod;
				}
			}
		}
		//~ if(op){
			//~ For(i,1,a.m){For(j,1,a.m)printf("%d ",a.a[i][j]);puts("");}
			//~ For(i,1,a.m){For(j,1,a.m)printf("%d ",b.a[i][j]);puts("");}
			//~ For(i,1,a.m){For(j,1,a.m)printf("%d ",res.a[i][j]);puts("");}
		//~ }
		res.m=a.m;
		return res;
	}
bool TTT;
int n,m;
vector<int> p[205];
int tot;
map<vector<int>,int>mp;
int a[205],vis[N];
void dfs(int x){
	if(x==n+1){
		++tot;
		For(i,1,n) p[tot].push_back(a[i]);
		mp[p[tot]]=tot;
		return ;
	}
	For(i,1,n){
		if(vis[i]) continue;
		vis[i]=1;
		a[x]=i;
		dfs(x+1);
		vis[i]=0;
		a[x]=0;
	}
}
signed main(){
	//~ cerr<<(&TTT-&SSS)/1024/1024<<"Mib";
	freopen("drama.in","r",stdin);
	freopen("drama.out","w",stdout);
	// ios::sync_with_stdio(false);
	// cin.tie(0); cout.tie(0);
	n=read(),m=read();
	dfs(1);
	//~ For(i,1,tot){for(auto v:p[i])printf("%lld ",v);puts("");}
	For(i,1,tot){
		vector<int>q=p[i];
		
		For(j,0,n-1){
			A.a[i][mp[q]]=1;
			//~ cout<<i<<" "<<mp[q]<<endl;
			if(j<n-1)swap(q[j],q[j+1]);
		}
	}
	Matrix res;
	A.m=res.m=tot;
	For(i,1,tot)For(j,1,tot)res.a[i][j]=0;
	For(i,1,tot) res.a[i][i]=1;
	//~ m--;
	while(m){
		if(m&1)res=cheng(res,A);
		A=cheng(A,A);
		m>>=1;
		//~ cout<<m<<endl;
	//~ For(i,1,tot){For(j,1,tot){printf("%lld ",A.a[i][j]);}puts("");}
	}
	int ans=0;
	//~ For(i,1,tot){For(j,1,tot){printf("%lld ",res.a[i][j]);}puts("");}
	ans+=res.a[1][1];
	ans%=Mod;
	printf("%lld\n",ans);
#ifdef LOCAL
    Debug("\nMy Time: %.3lfms\n", (double)clock() / CLOCKS_PER_SEC);
#endif
	return 0;
}
